//
// Created by liushuai on 18-8-6.
//

#ifndef EX9_LL_QUEUE_HPP
#define EX9_LL_QUEUE_HPP

#include <list>
using namespace std;
template <typename T>
class Queue{
private:
    list<T> lst;
public:
    Queue(){};
    void clear(){lst.clear();}
    bool isEmpty() const{
        return lst.empty();
    }
    T& front()
    {
        return lst.front();
    }
    T dequeue()
    {
        T eval = lst.front();
        lst.pop_front();
        return eval;
    }
    void enqueue(const T& eval)
    {
        lst.push_back(eval);
    }
};

#endif //EX9_LL_QUEUE_HPP
